using System.Globalization;
using System.Windows;
using System.Windows.Data;

namespace MiniTheme.Ui.Converters;

//将数字转换为左边距的转换器
public class LeftMarginConverter : IValueConverter
{
    public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
    {
        if (value is double spacing)
        {
            return new Thickness(spacing, 0, 0, 0);
        }
        return new Thickness(0);
    }
    public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
    {
        throw new NotImplementedException();
    }
}
